<?php
require_once  'Kanedo/View.php';
abstract class Kanedo_Controller_Abstract
{
	
	 /**
	  * View Klasse
	  *
	  * @var Kanedo_View
	  */
	 protected $_view;
	 /**
	  * Request Objekt
	  *
	  * @var Kanedo_Router_Request
	  */
	 protected $_request;
	
	final public function __construct(Kanedo_Router_Request $request)
	{
		$this->_request = $request;
		$this->_view = new Kanedo_View( $this->_request->getViewFile());
		$this->_view->baseUrl = $this->_request->getBaseUrl();
	}
	
	public function init()
	{
		
	}
	public function preDispatch()
	{
		
	}
	public function postDispatch()
	{
		
	}
	final public function flush()
	{
		echo $this->_view->renderFile();
	}
	
	public function __call($name, $arguments)
	{
		header("HTTP/1.0 404 Not Found");
		die();
	}
	

	
	
	
}
?>